home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / X11 / XGrabButton.z / XGrabButton
Encoding:
Text File  |  1998-10-30  |  9.1 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXGGGGrrrraaaabbbbBBBBuuuuttttttttoooonnnn((((3333XXXX11111111))))  XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))   XXXXGGGGrrrraaaabbbbBBBBuuuuttttttttoooonnnn((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XGrabButton, XUngrabButton - grab pointer buttons
  10.  
  11.      SSSSYYYYNNNNTTTTAAAAXXXX
  12.           XGrabButton(_d_i_s_p_l_a_y, _b_u_t_t_o_n, _m_o_d_i_f_i_e_r_s, _g_r_a_b__w_i_n_d_o_w,
  13.           _o_w_n_e_r__e_v_e_n_t_s, _e_v_e_n_t__m_a_s_k,
  14.                           _p_o_i_n_t_e_r__m_o_d_e, _k_e_y_b_o_a_r_d__m_o_d_e, _c_o_n_f_i_n_e__t_o,
  15.           _c_u_r_s_o_r)
  16.                 Display *_d_i_s_p_l_a_y;
  17.                 unsigned int _b_u_t_t_o_n;
  18.                 unsigned int _m_o_d_i_f_i_e_r_s;
  19.                 Window _g_r_a_b__w_i_n_d_o_w;
  20.                 Bool _o_w_n_e_r__e_v_e_n_t_s;
  21.                 unsigned int _e_v_e_n_t__m_a_s_k;
  22.                 int _p_o_i_n_t_e_r__m_o_d_e, _k_e_y_b_o_a_r_d__m_o_d_e;
  23.                 Window _c_o_n_f_i_n_e__t_o;
  24.                 Cursor _c_u_r_s_o_r;
  25.  
  26.           XUngrabButton(_d_i_s_p_l_a_y, _b_u_t_t_o_n, _m_o_d_i_f_i_e_r_s, _g_r_a_b__w_i_n_d_o_w)
  27.                 Display *_d_i_s_p_l_a_y;
  28.                 unsigned int _b_u_t_t_o_n;
  29.                 unsigned int _m_o_d_i_f_i_e_r_s;
  30.                 Window _g_r_a_b__w_i_n_d_o_w;
  31.  
  32.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  33.           _b_u_t_t_o_n    Specifies the pointer button that is to be grabbed
  34.                     or released or _A_n_y_B_u_t_t_o_n.
  35.  
  36.           _c_o_n_f_i_n_e__t_o
  37.                     Specifies the window to confine the pointer in or
  38.                     _N_o_n_e.
  39.  
  40.           _c_u_r_s_o_r    Specifies the cursor that is to be displayed or
  41.                     _N_o_n_e.
  42.  
  43.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  44.  
  45.           _e_v_e_n_t__m_a_s_k
  46.                     Specifies which pointer events are reported to the
  47.                     client.  The mask is the bitwise inclusive OR of
  48.                     the valid pointer event mask bits.
  49.  
  50.           _g_r_a_b__w_i_n_d_o_w
  51.                     Specifies the grab window.
  52.  
  53.           _k_e_y_b_o_a_r_d__m_o_d_e
  54.                     Specifies further processing of keyboard events.
  55.                     You can pass _G_r_a_b_M_o_d_e_S_y_n_c or _G_r_a_b_M_o_d_e_A_s_y_n_c.
  56.  
  57.           _m_o_d_i_f_i_e_r_s Specifies the set of keymasks or _A_n_y_M_o_d_i_f_i_e_r.  The
  58.                     mask is the bitwise inclusive OR of the valid
  59.                     keymask bits.
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXGGGGrrrraaaabbbbBBBBuuuuttttttttoooonnnn((((3333XXXX11111111))))  XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))   XXXXGGGGrrrraaaabbbbBBBBuuuuttttttttoooonnnn((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           _o_w_n_e_r__e_v_e_n_t_s
  75.                     Specifies a Boolean value that indicates whether
  76.                     the pointer events are to be reported as usual or
  77.                     reported with respect to the grab window if
  78.                     selected by the event mask.
  79.  
  80.           _p_o_i_n_t_e_r__m_o_d_e
  81.                     Specifies further processing of pointer events.
  82.                     You can pass _G_r_a_b_M_o_d_e_S_y_n_c or _G_r_a_b_M_o_d_e_A_s_y_n_c.
  83.  
  84.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  85.           The _X_G_r_a_b_B_u_t_t_o_n function establishes a passive grab.  In the
  86.           future, the pointer is actively grabbed (as for
  87.           _X_G_r_a_b_P_o_i_n_t_e_r), the last-pointer-grab time is set to the time
  88.           at which the button was pressed (as transmitted in the
  89.           _B_u_t_t_o_n_P_r_e_s_s event), and the _B_u_t_t_o_n_P_r_e_s_s event is reported if
  90.           all of the following conditions are true:
  91.  
  92.           +o    The pointer is not grabbed, and the specified button is
  93.                logically pressed when the specified modifier keys are
  94.                logically down, and no other buttons or modifier keys
  95.                are logically down.
  96.  
  97.           +o    The grab_window contains the pointer.
  98.  
  99.           +o    The confine_to window (if any) is viewable.
  100.  
  101.           +o    A passive grab on the same button/key combination does
  102.                not exist on any ancestor of grab_window.
  103.  
  104.           The interpretation of the remaining arguments is as for
  105.           _X_G_r_a_b_P_o_i_n_t_e_r.  The active grab is terminated automatically
  106.           when the logical state of the pointer has all buttons
  107.           released (independent of the state of the logical modifier
  108.           keys).
  109.  
  110.           Note that the logical state of a device (as seen by client
  111.           applications) may lag the physical state if device event
  112.           processing is frozen.
  113.  
  114.           This request overrides all previous grabs by the same client
  115.           on the same button/key combinations on the same window.  A
  116.           modifiers of _A_n_y_M_o_d_i_f_i_e_r is equivalent to issuing the grab
  117.           request for all possible modifier combinations (including
  118.           the combination of no modifiers). It is not required that
  119.           all modifiers specified have currently assigned KeyCodes.  A
  120.           button of _A_n_y_B_u_t_t_o_n is equivalent to issuing the request for
  121.           all possible buttons.  Otherwise, it is not required that
  122.           the specified button currently be assigned to a physical
  123.           button.
  124.  
  125.           If some other client has already issued a _X_G_r_a_b_B_u_t_t_o_n with
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXGGGGrrrraaaabbbbBBBBuuuuttttttttoooonnnn((((3333XXXX11111111))))  XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))   XXXXGGGGrrrraaaabbbbBBBBuuuuttttttttoooonnnn((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           the same button/key combination on the same window, a
  141.           _B_a_d_A_c_c_e_s_s error results.  When using _A_n_y_M_o_d_i_f_i_e_r or
  142.           _A_n_y_B_u_t_t_o_n, the request fails completely, and a _B_a_d_A_c_c_e_s_s
  143.           error results (no grabs are established) if there is a
  144.           conflicting grab for any combination.  _X_G_r_a_b_B_u_t_t_o_n has no
  145.           effect on an active grab.
  146.  
  147.           _X_G_r_a_b_B_u_t_t_o_n can generate _B_a_d_C_u_r_s_o_r, _B_a_d_V_a_l_u_e, and _B_a_d_W_i_n_d_o_w
  148.           errors.
  149.  
  150.           The _X_U_n_g_r_a_b_B_u_t_t_o_n function releases the passive button/key
  151.           combination on the specified window if it was grabbed by
  152.           this client.  A modifiers of _A_n_y_M_o_d_i_f_i_e_r is equivalent to
  153.           issuing the ungrab request for all possible modifier
  154.           combinations, including the combination of no modifiers.  A
  155.           button of _A_n_y_B_u_t_t_o_n is equivalent to issuing the request for
  156.           all possible buttons.  _X_U_n_g_r_a_b_B_u_t_t_o_n has no effect on an
  157.           active grab.
  158.  
  159.           _X_U_n_g_r_a_b_B_u_t_t_o_n can generate _B_a_d_V_a_l_u_e and _B_a_d_W_i_n_d_o_w errors.
  160.  
  161.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  162.           _B_a_d_C_u_r_s_o_r A value for a Cursor argument does not name a
  163.                     defined Cursor.
  164.  
  165.           _B_a_d_V_a_l_u_e  Some numeric value falls outside the range of
  166.                     values accepted by the request.  Unless a specific
  167.                     range is specified for an argument, the full range
  168.                     defined by the argument's type is accepted.  Any
  169.                     argument defined as a set of alternatives can
  170.                     generate this error.
  171.  
  172.           _B_a_d_W_i_n_d_o_w A value for a Window argument does not name a
  173.                     defined Window.
  174.  
  175.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  176.           XAllowEvents(3X11), XGrabPointer(3X11), XGrabKey(3X11),
  177.           XGrabKeyboard(3X11),
  178.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 4/30/98)
  196.  
  197.  
  198.  
  199.